package homework.threadwork.coding;

public class ThreadDemo extends Thread{
    public ThreadDemo(String name){
        super(name);
    }
    @Override
    public void run() {
        synchronized(this){
            System.out.println(getName());
//        for (int i=1;i<=1000;i++){
//            System.out.println(getName()+":打印 "+i);
//        }
    }

    }
}
